using System.Threading.Tasks;
using JoyfulHomeJourney.BackEnd.Infrastructure.Dtos.Requests.Objects;
using JoyfulHomeJourney.BackEnd.Server.Interfaces;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace JoyfulHomeJourney.BackEnd.Api.Admin.Controllers
{
	[TypeFilter(typeof(CheckLoginFilter), Arguments = new object[] { "admin" })]
	public class SysErrorLogsController : BaseController
	{
		private readonly ISysErrorLogsServer _sysErrorLogsServer;
		public SysErrorLogsController(ISysErrorLogsServer sysErrorLogsServer)
		{
			_sysErrorLogsServer = sysErrorLogsServer;
		}
		
		/// <summary>
		/// 分页
		/// </summary>
		/// <param></param>
		/// <returns></returns>
		[HttpGet]
		public async Task<IActionResult> Pagination(int page,int limit,string key)
		{
			return Send(await _sysErrorLogsServer.PaginationAsync(page,limit, key));
		}
	}
}
